/*!
 ** have NOT Finished** 
 ** https://www.luogu.org/blog/TheDawn/qian-xi-lca **
 * FileName: luogu-3379.cpp
 * This Problem is on luogu. The ID of the problem is 3379. 
 * Copyright(c) 2019 Shu_Yu_Mo
 * MIT Licensed
 * Luogu: https://www.luogu.org/space/show?uid=44615
 * Github: https://github.com/oldsuold/
 * Gitee: https://gitee.com/Shu_Yu_Mo/
 * These words were created by an amazing tool written by Shu_Yu_Mo.
 */
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstring>
#include<iostream>
#include<cmath>
#include<vector>
#include<queue>
#include<algorithm>
#define inf 0x7fffffff
using namespace std;
const int _ = 233;
const int _N = 1e5 + 100;
const int _M = 5 * 1e5 + 100; 
inline int read()
{
    char c = getchar(); int sign = 1; int x = 0;
    while(c > '9' || c < '0') { if(c=='-')sign = -1; c = getchar(); } 
    while(c <= '9' && c >= '0') { x *= 10; x += c - '0'; c = getchar(); }
    return x * sign;
}
int n, m, s;
namespace Graph{
	struct _edges{
		int node;
		int w;
		int nxt;
	}edge[_M];
	int head[_N];
	int tot = 0;
	void add(int u, int v,int w) 
	{
	//	printf("added %d %d\n", u, v);
	//	printf("%d--%d[lable=\"%d\"];\n", u, v, w);
		edge[++tot].nxt = head[u];
		edge[tot].node = v;
		edge[tot].w = w;
		head[u] = tot;
	
		swap(u, v);
	
		edge[++tot].nxt = head[u];
		edge[tot].node = v;
		edge[tot].w = w;
		head[u] = tot;
	}
	struct edges{
		int a;
		int b;
		int c;
	}e[_M];
}
namespace LCA{
	const int LOG = 23;
	int anc[_N][LOG];
//	int MinW[_N][LOG];
	int depth[_N];
	inline void dfs(int u, int p, /*int P_Udist,*/ int d)
	{
		anc[u][0] = p;
		depth[u] = d;
//		MinW[u][0] = P_Udist;
		for(register int i = Graph::head[u];i != 0;i = Graph::edge[i].nxt)
		{
			int node = Graph::edge[i].node;
			if(node == p) continue;
			dfs(node, u, Graph::edge[i].w, d + 1);
		}
	}
	inline void init() 
	{
		dfs(root, 0, /*0, */1);
		for(register int j = 1; j < LOG;j++)
			for(register int i = 1; i <= n;i++)
				ans[i][j] = anc[ anc[i][j - 1] ][j - 1];
	}
	inline void swim(int &x, int h)
	{
		for(register int i = 0;h > 0;i++)
		{
			if(h & 1)
				x = anc[x][i];
			h >>= 1;
		}
	}
	inline int query(int x, int y)
	{
		if(deepth)
	}
}
int main()
{
	n = read(), m = read(), s = read();
	for(register int i = 1;i <= n - 1;i++)
//		int tmpx = read(), tmpy = read();
		Graph::add(read(), read());
	for(register int i = 1;i <= m;i++)
	
    return 0;
}
